import {MockMethod} from 'vite-plugin-mock'
import {baseApi} from "../config";

export default [
    {
        url: `${baseApi}/system/dept/add`,
        method: 'POST',
        params: {
            "deptId": 0,
            "pid": 100,
            "deptName": "财务部",
            "orderNum": 3,
            "leader": "杨华明",
            "phone": "13896018742",
            "email": "32033658@qq.com",
            "status": 1
        },
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/dept/delete`,
        params: {id: 105},
        method: 'delete',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/dept/edit`,
        params: {
            "deptId": 100,
            "pid": 0,
            "ancestors": "0",
            "deptName": "奇讯科技",
            "orderNum": 0,
            "leader": "杨华明",
            "phone": "15888888888",
            "email": "ry@qq.com",
            "status": 1,
            "createdBy": 31,
            "updatedBy": 31,
            "createdAt": "2024-08-28 22:25:55",
            "updatedAt": "2024-08-29 10:43:04",
            "deletedAt": null,
            "children": [
                {
                    "deptId": 101,
                    "pid": 100,
                    "ancestors": "0,100",
                    "deptName": "深圳总公司",
                    "orderNum": 1,
                    "leader": "",
                    "phone": "15888888888",
                    "email": "ry@qq.com",
                    "status": 1,
                    "createdBy": 31,
                    "updatedBy": 31,
                    "createdAt": "2024-08-28 22:25:55",
                    "updatedAt": "2024-08-28 22:25:55",
                    "deletedAt": null,
                    "children": [
                        {
                            "deptId": 103,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "研发部门",
                            "orderNum": 1,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 104,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "市场部门",
                            "orderNum": 2,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 106,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "财务部门",
                            "orderNum": 4,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 107,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "运维部门",
                            "orderNum": 5,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        }
                    ]
                },
                {
                    "deptId": 102,
                    "pid": 100,
                    "ancestors": "0,100",
                    "deptName": "长沙分公司",
                    "orderNum": 2,
                    "leader": "",
                    "phone": "15888888888",
                    "email": "ry@qq.com",
                    "status": 1,
                    "createdBy": 31,
                    "updatedBy": 31,
                    "createdAt": "2024-08-28 22:25:55",
                    "updatedAt": "2024-08-28 22:25:55",
                    "deletedAt": null,
                    "children": [
                        {
                            "deptId": 108,
                            "pid": 102,
                            "ancestors": "0,100,102",
                            "deptName": "市场部门",
                            "orderNum": 1,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null,
                            "children": [
                                {
                                    "deptId": 202,
                                    "pid": 108,
                                    "ancestors": "",
                                    "deptName": "外勤",
                                    "orderNum": 1,
                                    "leader": "",
                                    "phone": "18888888888",
                                    "email": "aa@qq.com",
                                    "status": 1,
                                    "createdBy": 31,
                                    "updatedBy": 31,
                                    "createdAt": "2024-08-28 22:25:56",
                                    "updatedAt": "2024-08-28 22:25:56",
                                    "deletedAt": null
                                },
                                {
                                    "deptId": 203,
                                    "pid": 108,
                                    "ancestors": "",
                                    "deptName": "行政",
                                    "orderNum": 0,
                                    "leader": "",
                                    "phone": "18888888888",
                                    "email": "aa@qq.com",
                                    "status": 1,
                                    "createdBy": 31,
                                    "updatedBy": 31,
                                    "createdAt": "2024-08-28 22:25:56",
                                    "updatedAt": "2024-08-28 22:25:56",
                                    "deletedAt": null
                                }
                            ]
                        },
                        {
                            "deptId": 109,
                            "pid": 102,
                            "ancestors": "0,100,102",
                            "deptName": "财务部门",
                            "orderNum": 2,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        }
                    ]
                },
                {
                    "deptId": 200,
                    "pid": 100,
                    "ancestors": "",
                    "deptName": "大数据",
                    "orderNum": 1,
                    "leader": "",
                    "phone": "18888888888",
                    "email": "liou@qq.com",
                    "status": 0,
                    "createdBy": 31,
                    "updatedBy": 31,
                    "createdAt": "2024-08-28 22:25:56",
                    "updatedAt": "2024-08-28 22:25:56",
                    "deletedAt": null
                },
                {
                    "deptId": 201,
                    "pid": 100,
                    "ancestors": "",
                    "deptName": "开发",
                    "orderNum": 1,
                    "leader": "",
                    "phone": "18888888888",
                    "email": "li@qq.com",
                    "status": 0,
                    "createdBy": 31,
                    "updatedBy": 31,
                    "createdAt": "2024-08-28 22:25:56",
                    "updatedAt": "2024-08-28 22:25:56",
                    "deletedAt": null
                }
            ]
        },
        method: 'put',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/dept/list`,
        //params: {"pageNum": 1, "pageSize": 10,"deptName":'财务部',"status": 1 },
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "deptList": [
                        {
                            "deptId": 100,
                            "pid": 0,
                            "ancestors": "0",
                            "deptName": "奇讯科技",
                            "orderNum": 0,
                            "leader": "杨华明",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:55",
                            "updatedAt": "2024-08-29 10:43:04",
                            "deletedAt": null
                        },
                        {
                            "deptId": 101,
                            "pid": 100,
                            "ancestors": "0,100",
                            "deptName": "深圳总公司",
                            "orderNum": 1,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:55",
                            "updatedAt": "2024-08-28 22:25:55",
                            "deletedAt": null
                        },
                        {
                            "deptId": 102,
                            "pid": 100,
                            "ancestors": "0,100",
                            "deptName": "长沙分公司",
                            "orderNum": 2,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:55",
                            "updatedAt": "2024-08-28 22:25:55",
                            "deletedAt": null
                        },
                        {
                            "deptId": 103,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "研发部门",
                            "orderNum": 1,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 104,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "市场部门",
                            "orderNum": 2,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 105,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "测试部门",
                            "orderNum": 3,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 106,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "财务部门",
                            "orderNum": 4,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 107,
                            "pid": 101,
                            "ancestors": "0,100,101",
                            "deptName": "运维部门",
                            "orderNum": 5,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 108,
                            "pid": 102,
                            "ancestors": "0,100,102",
                            "deptName": "市场部门",
                            "orderNum": 1,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 109,
                            "pid": 102,
                            "ancestors": "0,100,102",
                            "deptName": "财务部门",
                            "orderNum": 2,
                            "leader": "",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 200,
                            "pid": 100,
                            "ancestors": "",
                            "deptName": "大数据",
                            "orderNum": 1,
                            "leader": "",
                            "phone": "18888888888",
                            "email": "liou@qq.com",
                            "status": 0,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 201,
                            "pid": 100,
                            "ancestors": "",
                            "deptName": "开发",
                            "orderNum": 1,
                            "leader": "",
                            "phone": "18888888888",
                            "email": "li@qq.com",
                            "status": 0,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 202,
                            "pid": 108,
                            "ancestors": "",
                            "deptName": "外勤",
                            "orderNum": 1,
                            "leader": "",
                            "phone": "18888888888",
                            "email": "aa@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        },
                        {
                            "deptId": 203,
                            "pid": 108,
                            "ancestors": "",
                            "deptName": "行政",
                            "orderNum": 0,
                            "leader": "",
                            "phone": "18888888888",
                            "email": "aa@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:56",
                            "updatedAt": "2024-08-28 22:25:56",
                            "deletedAt": null
                        }
                    ]
                }
            }
        }
    },
    {
        url: `${baseApi}/system/dept/treeSelect`,
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "deps": [
                        {
                            "deptId": 100,
                            "pid": 0,
                            "ancestors": "0",
                            "deptName": "奇讯科技",
                            "orderNum": 0,
                            "leader": "杨华明",
                            "phone": "15888888888",
                            "email": "ry@qq.com",
                            "status": 1,
                            "createdBy": 31,
                            "updatedBy": 31,
                            "createdAt": "2024-08-28 22:25:55",
                            "updatedAt": "2024-11-07 17:28:27",
                            "deletedAt": null,
                            "children": [
                                {
                                    "deptId": 101,
                                    "pid": 100,
                                    "ancestors": "0,100",
                                    "deptName": "深圳总公司",
                                    "orderNum": 1,
                                    "leader": "",
                                    "phone": "15888888888",
                                    "email": "ry@qq.com",
                                    "status": 1,
                                    "createdBy": 31,
                                    "updatedBy": 31,
                                    "createdAt": "2024-08-28 22:25:55",
                                    "updatedAt": "2024-08-28 22:25:55",
                                    "deletedAt": null,
                                    "children": [
                                        {
                                            "deptId": 103,
                                            "pid": 101,
                                            "ancestors": "0,100,101",
                                            "deptName": "研发部门",
                                            "orderNum": 1,
                                            "leader": "",
                                            "phone": "15888888888",
                                            "email": "ry@qq.com",
                                            "status": 1,
                                            "createdBy": 31,
                                            "updatedBy": 31,
                                            "createdAt": "2024-08-28 22:25:56",
                                            "updatedAt": "2024-08-28 22:25:56",
                                            "deletedAt": null,
                                            "children": null
                                        },
                                        {
                                            "deptId": 104,
                                            "pid": 101,
                                            "ancestors": "0,100,101",
                                            "deptName": "市场部门",
                                            "orderNum": 2,
                                            "leader": "",
                                            "phone": "15888888888",
                                            "email": "ry@qq.com",
                                            "status": 1,
                                            "createdBy": 31,
                                            "updatedBy": 31,
                                            "createdAt": "2024-08-28 22:25:56",
                                            "updatedAt": "2024-08-28 22:25:56",
                                            "deletedAt": null,
                                            "children": null
                                        },
                                        {
                                            "deptId": 106,
                                            "pid": 101,
                                            "ancestors": "0,100,101",
                                            "deptName": "财务部门",
                                            "orderNum": 4,
                                            "leader": "",
                                            "phone": "15888888888",
                                            "email": "ry@qq.com",
                                            "status": 1,
                                            "createdBy": 31,
                                            "updatedBy": 31,
                                            "createdAt": "2024-08-28 22:25:56",
                                            "updatedAt": "2024-08-28 22:25:56",
                                            "deletedAt": null,
                                            "children": null
                                        },
                                        {
                                            "deptId": 107,
                                            "pid": 101,
                                            "ancestors": "0,100,101",
                                            "deptName": "运维部门",
                                            "orderNum": 5,
                                            "leader": "",
                                            "phone": "15888888888",
                                            "email": "ry@qq.com",
                                            "status": 1,
                                            "createdBy": 31,
                                            "updatedBy": 31,
                                            "createdAt": "2024-08-28 22:25:56",
                                            "updatedAt": "2024-08-28 22:25:56",
                                            "deletedAt": null,
                                            "children": null
                                        }
                                    ]
                                },
                                {
                                    "deptId": 102,
                                    "pid": 100,
                                    "ancestors": "0,100",
                                    "deptName": "长沙分公司",
                                    "orderNum": 2,
                                    "leader": "",
                                    "phone": "15888888888",
                                    "email": "ry@qq.com",
                                    "status": 1,
                                    "createdBy": 31,
                                    "updatedBy": 31,
                                    "createdAt": "2024-08-28 22:25:55",
                                    "updatedAt": "2024-08-28 22:25:55",
                                    "deletedAt": null,
                                    "children": [
                                        {
                                            "deptId": 108,
                                            "pid": 102,
                                            "ancestors": "0,100,102",
                                            "deptName": "市场部门",
                                            "orderNum": 1,
                                            "leader": "",
                                            "phone": "15888888888",
                                            "email": "ry@qq.com",
                                            "status": 1,
                                            "createdBy": 31,
                                            "updatedBy": 31,
                                            "createdAt": "2024-08-28 22:25:56",
                                            "updatedAt": "2024-08-28 22:25:56",
                                            "deletedAt": null,
                                            "children": [
                                                {
                                                    "deptId": 202,
                                                    "pid": 108,
                                                    "ancestors": "",
                                                    "deptName": "外勤",
                                                    "orderNum": 1,
                                                    "leader": "",
                                                    "phone": "18888888888",
                                                    "email": "aa@qq.com",
                                                    "status": 1,
                                                    "createdBy": 31,
                                                    "updatedBy": 31,
                                                    "createdAt": "2024-08-28 22:25:56",
                                                    "updatedAt": "2024-08-28 22:25:56",
                                                    "deletedAt": null,
                                                    "children": null
                                                },
                                                {
                                                    "deptId": 203,
                                                    "pid": 108,
                                                    "ancestors": "",
                                                    "deptName": "行政",
                                                    "orderNum": 0,
                                                    "leader": "",
                                                    "phone": "18888888888",
                                                    "email": "aa@qq.com",
                                                    "status": 1,
                                                    "createdBy": 31,
                                                    "updatedBy": 31,
                                                    "createdAt": "2024-08-28 22:25:56",
                                                    "updatedAt": "2024-08-28 22:25:56",
                                                    "deletedAt": null,
                                                    "children": null
                                                }
                                            ]
                                        },
                                        {
                                            "deptId": 109,
                                            "pid": 102,
                                            "ancestors": "0,100,102",
                                            "deptName": "财务部门",
                                            "orderNum": 2,
                                            "leader": "",
                                            "phone": "15888888888",
                                            "email": "ry@qq.com",
                                            "status": 1,
                                            "createdBy": 31,
                                            "updatedBy": 31,
                                            "createdAt": "2024-08-28 22:25:56",
                                            "updatedAt": "2024-08-28 22:25:56",
                                            "deletedAt": null,
                                            "children": null
                                        }
                                    ]
                                },
                                {
                                    "deptId": 204,
                                    "pid": 100,
                                    "ancestors": "",
                                    "deptName": "财务部",
                                    "orderNum": 3,
                                    "leader": "杨华明",
                                    "phone": "13896018742",
                                    "email": "32033658@qq.com",
                                    "status": 1,
                                    "createdBy": 31,
                                    "updatedBy": 0,
                                    "createdAt": "2024-11-07 17:30:20",
                                    "updatedAt": "2024-11-07 17:30:20",
                                    "deletedAt": null,
                                    "children": null
                                }
                            ]
                        }
                    ]
                }
            }
        }
    }
] as MockMethod[]
